package com.alibaba.algo.cooperation.usercomponent.vo.res.user;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Data
@Getter
@Setter
public class SelectResourceActionListVO {

    /**
     * 资源属性
     */
    private long resourceId;
    private String resourceCode;
    private String resourceName;
    //资源父节点的id
    private long parentId;

    /**
     * 动作属性
     */
    private long actionId;
    private String actionCode;
    private String actionName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SelectResourceActionListVO that = (SelectResourceActionListVO) o;
        return resourceId == that.resourceId && parentId == that.parentId && actionId == that.actionId && Objects.equals(resourceCode, that.resourceCode) && Objects.equals(resourceName, that.resourceName) && Objects.equals(actionCode, that.actionCode) && Objects.equals(actionName, that.actionName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(resourceId, resourceCode, resourceName, parentId, actionId, actionCode, actionName);
    }
}
